package com.itqf.client;

import com.itqf.entity.TbItem;
import org.springframework.stereotype.Component;

/**
 * @Description:
 * @Company: 千锋互联
 * @Author: 李丽婷
 * @Date: 2020/12/23
 * @Time: 下午4:50
 */
@Component
public class TbItemFeignClientFallBack implements TbItemFeignClient {


    //调用失败时会调用该方法
    @Override
    public TbItem findById(long id) {
        System.out.println("服务器忙.......");
        TbItem tbItem = new TbItem();
        tbItem.setId(-1);
        tbItem.setTitle("服务器丢了.....");
        return  tbItem;
    }

    @Override
    public TbItem findAll() {
        return null;
    }
}
